# this recipe was taken from http://www.onlamp.com/pub/a/python/2002/07/11/recipes.html
class _Constants:
  class ConstError(TypeError): pass
  def __setattr__(self, name, value):
    if self.__dict__.has_key(name):
      raise self.ConstError, "Can't rebind const(%s)"%name
    self.__dict__[name ] = value
  def __delattr__(self, name):
    if self.__dict__.has_key(name):
      raise self.ConstError, "Can't unbind	const(%s)"%name
    raise NameError, name
import sys
sys.modules[__name__] = _Constants()